home *** CD-ROM | disk | FTP | other *** search
- echo off
- SAVEDIR
- if errorlevel 4 goto SDERR
- if errorlevel 3 goto OLDOS
- if errorlevel 1 goto ENVERR
- set
- wait 000002
- SET TEST=To_determine_whether_there_is_enough_space.
- IF not "%TEST%"=="To_determine_whether_there_is_enough_space." goto ENVERR
- SET TEST=
- SET BDIR=%LDIR%
- :: If BatKit is in a ROOT, set BDIR to strip "\" from end.
- if %LDIR%==%LDRV%\ SET BDIR=%LDRV%
- :MENU
- %BDIR%\SAVEDIR %BDIR%
- %BDIR%\GetKey /K"12345DPHLX-"/F"%BDIR%\MENU.GKF"/E
- if errorlevel 88 goto STOP
- if errorlevel 80 goto PRINT
- if errorlevel 76 goto LIST
- if errorlevel 72 goto HELP
- if errorlevel 68 goto SUBMEN
- if errorlevel 53 goto BIGMENU
- if errorlevel 52 goto MAKESCRN
- if errorlevel 51 goto COLOTONE
- if errorlevel 50 goto WP
- if errorlevel 49 goto DEMO
- goto QUIT
- :COLOTONE
- :: For DOSs before 3.1 pre-set the environment variable by using the next line
- :: SET GK=This is here to save plenty of room for the GK variable
- %BDIR%\GetKey /M"#&22@C"/N/W0
- :: For DOSs after 3.0 use the /e syntax to expand the environment of the shell
- COMMAND /e:2000 /C COLOTONE
- goto MENU
- :DEMO
- %BDIR%\GetKey /F"DEMO.GKF"/n
- Goto MENU
- :BIGMENU
- GETKEY /S/K"123456789-X"/4/F"ASMENU.GKF"
- :TEST
- IF ERRORLEVEL 88 GOTO MENU
- IF ERRORLEVEL 57 GETKEY /W0/M"@S9"
- IF ERRORLEVEL 56 GETKEY /W0/M"@S8"
- IF ERRORLEVEL 55 GETKEY /W0/M"@S7"
- IF ERRORLEVEL 54 GETKEY /W0/M"@S6"
- IF ERRORLEVEL 53 GETKEY /W0/M"@S5"
- IF ERRORLEVEL 52 GETKEY /W0/M"@S4"
- IF ERRORLEVEL 51 GETKEY /W0/M"@S3"
- IF ERRORLEVEL 50 GETKEY /W0/M"@S2"
- IF ERRORLEVEL 49 GETKEY /W0/M"@S1"
- IF ERRORLEVEL 45 GETKEY /W0/M"@S255"
- GETKEY /K"123456789-X"/M"@X65@Y21"
- GOTO TEST
- :MAKESCRN
- GetKey /w0/f"msdemo.gkf"/s/n
- goto MENU
- :PRINT
- COPY %BDIR%\BATKIT.DOC PRN
- goto MENU
- :LIST
- GetKey /k"yn"/m"@T Do you have a text file viewer called LIST? "
- if errorlevel 89 goto HAVELIST
- GetKey /f"menu.gkf@l"
- type %BDIR%\BATKIT.DOC | more
- goto MENU
- :HAVELIST
- LIST %BDIR%\BATKIT.DOC
- goto MENU
- :HELP
- GetKey /h
- GetKey /w30/m"@X65#&1FPress any key"/n/s
- goto MENU
- :SUBMEN
- %BDIR%\SAVEDIR
- %BDIR%\GetKey /K"XLGFDC-"/F"%BDIR%\MENU.GKF@S"/E/A/Z
- if errorlevel 88 goto MENU
- if errorlevel 76 goto LSTFILE
- if errorlevel 71 goto CHGDIR
- if errorlevel 70 goto FORMAT
- if errorlevel 68 goto DELETE
- if errorlevel 67 goto COPY
- goto MENU
- :CHGDIR
- %BDIR%\GetKey /L21/G/V"NPATH"/M"@X50@Y6#&0E@DT@X16@Y20Enter the NEW drive and path: @T&05#&700"
- if %NPATH%! == ! goto SUBMEN
- %BDIR%\SAVEDIR %NPATH%
- set NPATH=
- goto SUBMEN
- :LSTFILE
- %BDIR%\GetKey /w0/m"@O@C"
- dir/p
- %BDIR%\WAIT /c 00:00:30
- goto SUBMEN
- :DELETE
- %BDIR%\GetKey /L8/G/N"*"/KF"%BDIR%\GetKey.RSP"/M"@X20@Y20Enter password: (Hint - try Password) @F"
- %BDIR%\GetKey /Z/L12/g/v"DFILE"/f"%BDIR%\MENU.GKF@D"
- if %DFILE%! == X! goto SUBMEN
- echo -
- echo -
- dir %DFILE%
- %BDIR%\GetKey /m"══ Press Y to delete %LDIR%\%DFILE%: "/n/s
- if errorlevel 90 goto SUBMEN
- if errorlevel 89 DEL %DFILE%
- %BDIR%\WAIT /c 00:00:30
- goto SUBMEN
- :COPY
- getkey /w10/m"@H@T #&1E This is just a #&9Esample#&1E menu selection; it is not functional. @CR-@O"/n
- goto SUBMEN
- :FORMAT
- %BDIR%\GetKey /v/k"abx"/m"@X50@Y6#&0E@DT@X20@Y20Diskette drive to format (or X to eXit): "
- if errorlevel 88 goto SUBMEN
- cls
- format %GK%:
- goto SUBMEN
- :WP
- getkey /w10/m"@H@T #&1E This is just a #&9Esample#&1E menu selection; it is not functional."/n
- goto MENU
- :STOP
- %BDIR%\GetKey /f"%BDIR%\menu.gkf@x"/N/s
- if errorlevel 78 goto PARK
- if errorlevel 77 goto MENU
- :PARK
- %BDIR%\SAVEDIR %BDIR%
- SET BDIR=
- SET LDIR=
- SET LDRV=
- SET GK=
- SET DFILE=
- goto QUIT
- :OLDOS
- getkey /w0/z/m"@T #&CABatKit requires MS or PC-DOS 2.x or above to run!"
- wait /c 000030
- goto QUIT
- :ENVERR
- getkey /w0/z/m"@T #&CAYou don't have enough free environment space for BatDemo! See README.1ST."
- wait /c 000030
- goto QUIT
- :SDERR
- echo SaveDir execution error
- echo
- SaveDir ?
- wait /c
- :QUIT
-